1. Field of the Invention
The present invention relates to a file storage apparatus, a method for operating file storage apparatus, and program for storing a file.
2. Description of the Related Art
The service of leasing disk space for storing files targeting an unspecified number of users via a communication line such as the internet has been previously provided (e.g., Japanese unexamined patent publication No. 2003-67253). In this service, a directory is created in a storage unit of a server connected to a communication line such as internet with respect to each user, and the user uploads files to the directory using FTP (File Transfer Protocol) etc. for storage of the file.
In the conventional service of leasing disk space, in cases where multiple users upload the same or similar files, the same contents (e.g., same bit sequences, or byte sequences) are stored in several files, thereby causing an inefficient use of disk space.
Further, in the conventional service, where the users know each other, and further know that their files to be stored are the same or similar, it is possible to share an account or to remove the redundancy of the contents overlapping between the similar files before uploading, thereby efficiently using the storage capacity. However, in this case, a consensus among the users is necessary before uploading the files, thereby placing a burden on the users. Further, in the case of targeting an unspecified number of users, the users rarely know each other. Furthermore, where the user desires to keep the content of the file confidential, it is difficult to develop a consensus among the users.
The applicant of the present invention conceived of a method, in which information necessary for encoding the content of the file is given by a service provider of leasing disk space, this information is stored in a domain different from the domain storing the file, and the file contents are replaced with a shorter code thereby removing the redundancy of the files. For example, the bit sequence commonly appearing in the files uploaded by multiple users is extracted, a code is correlated with the bit sequence, and the specific bit sequence in the files is replaced with the code, so that the redundancy is removed, and the data is efficiently stored. Note that, in this case, it is necessary for the service provider to pay a fee for storing the information encoding the data, or to distribute the cost as a common service fee to the users. In cases where the service provider pays this cost, if a huge amount of the information for encoding is required, the overhead cost for managing the information makes it difficult to continue the service. Further, in cases where the cost is distributed to the users, if the cost is evenly distributed, the user, whose file stored does not include the content common to the other users, has to pay an unreasonable cost.